package com.objectville.restaurant;

import com.objectville.restaurant.client.Waitress;
import com.objectville.restaurant.component.MenuComponent;
import com.objectville.restaurant.composite.Menu;
import com.objectville.restaurant.leaf.MenuItem;

/* The Composite Pattern allows you to compose objects into three
 * structures to represent part-whole hierarchies. Composite lets
 * clients treat individual objects and compositions of objects
 * uniformly.
 * 
 * */

public class MenuTestDrive {
	public static void main(String[] args) {
		MenuComponent pancakeHouseMenu = new Menu("PANCKAGE HOUSE MENU",
				"Breakfast");
		MenuComponent dinerMenu = new Menu("DINER MENU", "Lunch");
		MenuComponent cafeMenu = new Menu("CAFE MENU", "Dinner");
		MenuComponent dessertMenu = new Menu("DESSERT MENU",
				"Dessert of course!");
		MenuComponent allMenus = new Menu("ALL MENUS", "All menus combined");

		
		pancakeHouseMenu.add(new MenuItem("K&B Pancake Breakfast",
				"Pancakes with scrambled eggs and toast", true, 2.99));

		pancakeHouseMenu.add(new MenuItem("Regular Pancake Breakfast",
				"Pancakes with fried eggs, sausage", false, 2.99));

		pancakeHouseMenu.add(new MenuItem("Blueberry Pancakes",
				"Pancakes made with fresh blueberries", true, 3.49));

		pancakeHouseMenu.add(new MenuItem("Waffles",
				"Waffles with your choice of blueberries or strawberries",
				true, 2.99));

		allMenus.add(pancakeHouseMenu);
		allMenus.add(dinerMenu);
		allMenus.add(cafeMenu);

		dinerMenu.add(new MenuItem("Pasta",
				"Spagetti with Marinara Sauce, and a slice of sourdough bread",
				true, 3.89));
		dinerMenu.add(dessertMenu);

		dessertMenu.add(new MenuItem("Apple Pie",
				"Apple pie, with flakey crust, topped with vanilla icecream",
				true, 1.59));

		Waitress waitress = new Waitress(allMenus);
		//waitress.printMenu();
		waitress.printVegetarianMenu();
	}
}
